package my.soft.aiteacher.teacher.controller;


import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import my.soft.aiteacher.teacher.pojo.ConceptVo;
import my.soft.aiteacher.teacher.service.IConceptService;
import my.soft.aiteacher.utils.R;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 基本概念，通过fileId进行关联 前端控制器
 * </p>
 *
 * @author GMCX
 * @since 2025-06-05
 */
@RestController
@RequestMapping("/concept")
@Tag(name = "教师-基本概念管理", description = "教师-基本概念管理")
public class ConceptController {
    @Resource
    private IConceptService conceptService;
    @PreAuthorize("hasAnyAuthority('upload:concept')")
    @Operation(summary = "上传基本概念")
    @RequestMapping(value = "/upload", method = {RequestMethod.POST})
    public R upload(@RequestBody List<ConceptVo> conceptVo) {
        conceptService.upload(conceptVo);
        return R.success("ok");
    }
//    @RequestMapping(value = "/detail/{fileId}", method = {RequestMethod.GET})
//    public R detail(@PathVariable Long fileId) {
//        ConceptVo vo =  conceptService.detail(fileId);
//        return R.success(vo);
//    }

}
